<template>
<el-checkbox-group v-model="checkedHobbyList">
  <el-checkbox v-for="hobby in hobbies" :label="hobby":key="hobby">
    {{hobby}}
  </el-checkbox>
</el-checkbox-group>

</template>

<script setup>
import {ref} from "vue";

const hobbies=ref(['吃','喝','玩','乐'])
const checkedHobbyList=ref(['吃','玩'])
</script>

<style scoped>

</style>